import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const routes = [{
    path: "/login",
    name: "login",
    meta: {
        title: "用户登录"
    },
    component: () => import("@/pages/login")
}, {
    path: "/",
    component: () => import("@/layouts/BasicLayout"),
    redirect: "/home",
    children: [
        {
            path: "/home",
            component: () => import("@/pages/home")
        }
    ]
}
];

const router = new VueRouter({
    mode: "history",
    routes
});

export default router;
